package com.nnnu.orange.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.Email;
import lombok.*;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.URL;

/**
 * <p>
 * 存储用户的详细信息
 * </p>
 *
 * @author zk
 * @since 2024-11-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("users")
@ApiModel(value = "Users对象", description = "存储用户的详细信息")
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class Users implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户唯一标识")
    @TableId(value = "user_id", type = IdType.AUTO)
    private Integer userId;

    @ApiModelProperty(value = "用户名")
    private String username;

    @ApiModelProperty(value = "用户密码（加密存储）")
    @JsonIgnore
    private String password;

    @ApiModelProperty(value = "用户的全名")
    private String fullName;

    @ApiModelProperty(value = "用户邮箱")
    @Email
    private String email;

    @ApiModelProperty(value = "用户联系电话")
    private String phone;

    @ApiModelProperty(value = "用户地址")
    private String address;

    @ApiModelProperty(value = "用户会员类型")
    private Integer membershipType;

    @ApiModelProperty(value = "注册时间")
    private LocalDateTime registrationDate;

    @ApiModelProperty(value = "最后登录时间")
    private LocalDateTime lastLogin;

    @ApiModelProperty(value = "账户状态")
    private Integer status;

    @ApiModelProperty(value = "用户头像URL")
    @URL
    private String profilePictureUrl;

    @ApiModelProperty(value = "邮箱是否验证")
    private Boolean isVerified;

    @ApiModelProperty(value = "出生日期")
    private LocalDate birthDate;

    @ApiModelProperty(value = "性别")
    private Integer gender;



}
